int POT_PIN = A0;
int potValue = 0;
int lastPotValue = 0;

void setup() {
  // put your setup code here, to run once:
  pinMode(POT_PIN, INPUT);
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  potValue = analogRead(POT_PIN);

  if (potValue != lastPotValue) {
    Serial.println(potValue);
    lastPotValue = potValue;
    delay(50);
  }
}